# -*- mode: python; -*-

Import("env")

env = env.Clone()

env.SConscript(
    must_exist=1,
    dirs=[
        "column",
        "mutable",
        "util",
    ],
    exports=[
        "env",
    ],
)

env.CppUnitTest(
    target="bson_test",
    source=[],
    LIBDEPS=[],
)

env.Benchmark(
    target="bson_bm",
    source=[
        "bson_bm.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/base",
        "$BUILD_DIR/mongo/bson/bson_validate",
    ],
    CONSOLIDATED_TARGET="first_half_bm",
)

env.CppLibfuzzerTest(
    target="bson_validate_fuzzer",
    source=[
        "bson_validate_fuzzer.cpp",
        "bson_validate_old.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/base",
        "$BUILD_DIR/mongo/bson/bson_validate",
    ],
)
